package grgu.rud.glava1.b2;

import java.util.Scanner;

public class ChislaBM {

	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		System.out.print("Enter the amount of numbers: ");
		int n = sc.nextInt();
		int[] arr = new int[n];
		System.out.print("Enter the numbers ");
		for (int i = 0; i < arr.length; i++) {
			arr[i] = sc.nextInt();
		}
		int min = arr[0];
		int max = arr[0];
		for (int i = 0; i < arr.length; i++) {
			if (arr[i] > max) {
				max = arr[i];
			}
			if (arr[i] < max) {
				min = arr[i];
			}
		}
		System.out.println("Max " + max);
		System.out.println("Min " + min);
	}

}
